from mysite.finance.models import SpendingItem
from mysite.finance.models import BudgetItem, Category, Frequency
from django.contrib import admin

class BudgetItemAdmin(admin.ModelAdmin):
    fields = ['name', 'category', 'frequency', 'amount', 'enabled']
    list_display = ('name', 'category', 'frequency', 'amount', 'enabled')
    list_filter = ['category']
    search_fields =['name']

class FrequencyAdmin(admin.ModelAdmin):
    fields = ['name', 'scalar']

admin.site.register(BudgetItem, BudgetItemAdmin)
admin.site.register(Category)
admin.site.register(Frequency, FrequencyAdmin)
admin.site.register(SpendingItem)
